//
//  CZQAddressLocationCell.m
//  LoveBeer
//
//  Created by 崔正强 on 17/5/4.
//  Copyright © 2017年 崔正强. All rights reserved.
//

#import "CZQAddressLocationCell.h"
#import <Masonry.h>

@implementation CZQAddressLocationCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        [self setupUI];
    }
    return self;
}

- (void)setupUI {
    
    UILabel *desLabel = [[UILabel alloc] init];
    
    [self.contentView addSubview:desLabel];
    
    desLabel.text = @"定位到当前位置";
    
    desLabel.textAlignment = NSTextAlignmentCenter;
    
    [desLabel sizeToFit];
    
    [desLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.equalTo(self.contentView);
        make.top.bottom.equalTo(self.contentView);
    }];
    
    UIImageView *imgView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"wxb"]];
    
    [self.contentView addSubview:imgView];
    
    [imgView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerY.equalTo(desLabel);
        make.trailing.equalTo(desLabel.mas_leading).offset(-7);
        make.width.height.mas_equalTo(40);
    }];
    
}



- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}


@end
